#pragma once
#include <game/Config.h>

#include <memory>
#include <xml/Object.h>

namespace liba {
namespace lib3d {
namespace node {

class Node;
class Camera;

} // namespace node
} // namespace lib3d
} // namespace liba

ARELLO_GAME_NAMESPACE_DECL_START

class CameraDefinition
	: private xml::ObjectANSI
{
private:
	virtual bool on_node(xml::Provider * prov, const std::string & name);

public:
	CameraDefinition();
	~CameraDefinition();

	void SetSceneRoot(liba::lib3d::node::Node* sceneRoot);

	xml::ObjectANSI* GetLoader() { return this; }

	std::auto_ptr<liba::lib3d::node::Camera> ReleaseCamera() { return this->camera; }
private:
	std::auto_ptr<liba::lib3d::node::Camera> camera;
	liba::lib3d::node::Node* sceneRoot;
};

ARELLO_GAME_NAMESPACE_DECL_END